package org.jeecg.modules.appuser.util;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.modules.pdd.util.DingDanXiaUtil;

import java.util.HashMap;
import java.util.Map;

@Slf4j
public class TransferSQT {


    public static String transferData(String uid, String transferNum) {


        String url = "http://bithex.blockinsight.com.cn/member/sqkd/transfer";
        Map<String, Object> map = new HashMap<>();
        map.put("uid", uid);
        map.put("transferNum", transferNum);
        String token = JwtUtil.sign();
        map.put("token", token);
        JSONObject jsonObj = new JSONObject(map);
        String resultStr = "";
        try {
            log.info("划转data----->>>>" + jsonObj.toString());
            resultStr = HttpUtil.post(url, jsonObj.toString());
        } catch (Exception e) {
            log.info("\n\n\n\n\n");
            log.info("--------------------划转->>>>" + url);
            log.info(uid + "----uid->>>>" + e.getMessage());
            log.info(transferNum + "---transferNum--->>>>" + e.getMessage());
            log.info("\n\n\n\n\n");
            e.printStackTrace();
        }

        return resultStr;

    }


}
